<template>
  <div class="block">
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage"
      :page-size="pageSize"
      layout="total, prev, pager, next"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "Pagination",
  data() {
    return {
      currentPage: 1,
      total: 200,
      pageSize:8,

    };
  },
  methods: {
    // 页码改变时
    handleCurrentChange() {
      const pageInfo = {
        page:this.currentPage,
        limit:this.pageSize
      }
      this.$emit('pageChange',pageInfo)
    },
  },
};
</script>

<style>
</style>